package com.javapda.c328r.command;

import java.util.LinkedHashMap;
import java.util.Map;

/**
Picture Type Error 01h
Parameter Error 0bh
Picture Up Scale 02h
Send Register Timeout 0ch
Picture Scale Error 03h
Command ID Error 0dh
Unexpected Reply 04h
Picture Not Ready 0fh
Send Picture Timeout 05h
Transfer Package Number Error 10h
Unexpected Command 06h
Set Transfer Package Size Wrong 11h
SRAM JPEG Type Error 07h
Command Header Error F0h
SRAM JPEG Size Error 08h
Command Length Error F1h
Picture Format Error 09h
Send Picture Error F5h
Picture Size Error 0ah
Send Command Error ffh 
* 
 * @author javapda
 *
 */
public abstract class ComediaErrorNumber {
	public static final int PICTURE_TYPE_ERROR = 0x01;
	public static final int PICTURE_UP_SCALE_ERROR = 0x02;
	public static final int PICTURE_SCALE_ERROR = 0x03;
	public static final int UNEXPECTED_REPLY_ERROR = 0x04;
	public static final int SEND_PICTURE_TIMEOUT_ERROR = 0x05;
	public static final int UNEXPECTED_COMMAND_ERROR = 0x06;
	public static final int SRAM_JPEG_TYPE_ERROR = 0x07;
	public static final int SRAM_JPEG_SIZE_ERROR = 0x08;
	public static final int PICTURE_FORMAT_ERROR = 0x09;
	public static final int PICTURE_SIZE_ERROR = 0x0A;
	public static final int PARAMETER_ERROR = 0x0B;
	public static final int SEND_REGISTER_TIMEOUT_ERROR = 0x0C;
	public static final int COMMAND_ID_ERROR = 0x0D;
	public static final int PICTURE_NOT_READY_ERROR = 0x0F;
	public static final int TRANSFER_PACKAGE_NUMBER_ERROR = 0x10;
	public static final int SET_TRANSFER_PACKAGE_SIZE_WRONG_ERROR = 0x11;
	public static final int COMMAND_HEADER_ERROR = 0xF0;
	public static final int COMMAND_LENGTH_ERROR = 0xF1;
	public static final int SEND_PICTURE_ERROR = 0xF5;
	public static final int SEND_COMMAND_ERROR = 0xFF;
	public static final Map dmap = new LinkedHashMap();
	static {
        dmap.put(new Integer(PICTURE_TYPE_ERROR),"PICTURE_TYPE_ERROR");
        dmap.put(new Integer(PICTURE_UP_SCALE_ERROR),"PICTURE_UP_SCALE_ERROR");
        dmap.put(new Integer(PICTURE_SCALE_ERROR),"PICTURE_SCALE_ERROR");
        dmap.put(new Integer(UNEXPECTED_REPLY_ERROR),"UNEXPECTED_REPLY_ERROR");
        dmap.put(new Integer(SEND_PICTURE_TIMEOUT_ERROR),"SEND_PICTURE_TIMEOUT_ERROR");
        dmap.put(new Integer(UNEXPECTED_COMMAND_ERROR),"UNEXPECTED_COMMAND_ERROR");
        dmap.put(new Integer(SRAM_JPEG_TYPE_ERROR),"SRAM_JPEG_TYPE_ERROR");
        dmap.put(new Integer(SRAM_JPEG_SIZE_ERROR),"SRAM_JPEG_SIZE_ERROR");
        dmap.put(new Integer(PICTURE_FORMAT_ERROR),"PICTURE_FORMAT_ERROR");
        dmap.put(new Integer(PICTURE_SIZE_ERROR),"PICTURE_SIZE_ERROR");
        dmap.put(new Integer(PARAMETER_ERROR),"PARAMETER_ERROR");
        dmap.put(new Integer(SEND_REGISTER_TIMEOUT_ERROR),"SEND_REGISTER_TIMEOUT_ERROR");
        dmap.put(new Integer(COMMAND_ID_ERROR),"COMMAND_ID_ERROR");
        dmap.put(new Integer(PICTURE_NOT_READY_ERROR),"PICTURE_NOT_READY_ERROR");
        dmap.put(new Integer(TRANSFER_PACKAGE_NUMBER_ERROR),"TRANSFER_PACKAGE_NUMBER_ERROR");
        dmap.put(new Integer(SET_TRANSFER_PACKAGE_SIZE_WRONG_ERROR),"SET_TRANSFER_PACKAGE_SIZE_WRONG_ERROR");
        dmap.put(new Integer(COMMAND_HEADER_ERROR),"COMMAND_HEADER_ERROR");
        dmap.put(new Integer(COMMAND_LENGTH_ERROR),"COMMAND_LENGTH_ERROR");
        dmap.put(new Integer(SEND_PICTURE_ERROR),"SEND_PICTURE_ERROR");
        dmap.put(new Integer(SEND_COMMAND_ERROR),"SEND_COMMAND_ERROR");
	};
	public static Map getDescriptionMap() { return dmap; }
	public static String getDescription(int errorNumber) { return (String)dmap.get(errorNumber); }
}
